package com.zcxy.sys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zcxy.mybatis.bean.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;

/**
 * 字典主表
 *
 * @author zcc
 * @email 860474958@qq.com
 * @date 2020-06-04
 */
@Data
@TableName("sys_dict")
@ApiModel(value = "SysDict", description = "字典主表实体对象")
public class SysDict extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键", required = false)
    @TableId(type = IdType.UUID)
    @Length(max = 50, message = "id 超出最大长度50")
    private String id;

    @ApiModelProperty(value = "列表代码", required = false)
    @Length(max = 50, message = "code 超出最大长度50")
    private String code;

    @ApiModelProperty(value = "列表名称", required = false)
    @Length(max = 50, message = "name 超出最大长度50")
    @NotEmpty(message = "name不能为空")
    private String name;

    @ApiModelProperty(value = "描述", required = false)
    @Length(max = 255, message = "remark 超出最大长度255")
    private String remark;

    @ApiModelProperty(value = "0禁用1启用", required = false)
    @Length(max = 1, message = "status 超出最大长度1")
    private String status;

    @ApiModelProperty(value = "排序", required = false)
    private Integer sort;


    @ApiModelProperty(value = "0-可删除1不可删除系统默认", required = false)
    @Length(max = 1, message = "canDel 超出最大长度1")
    private String canDel;

}
